#include <iostream>

#include "sorter.01.h"
#include "Vector/vector.03.h"



	class A {
	public:
		unsigned int a;
		char b;
		double c;
		float d;
		Vector<> V;
	} *a;	

float ff(int i){
	std::cout<<i<<std::endl;
	return i;
}
	
	
int main() {


	

	
	Sorter sorter;
	
	a = new A[5];
	
	a[0].c = 0;
	a[1].c = 1;
	a[2].c = 2;
	a[3].c = 3;
	a[4].c = 4;
	
	a[0].d = -99;
	a[1].d = 2;
	a[2].d = 3;
	a[3].d = 4;
	a[4].d = 5;
	
	a[0].V = Vector<>(3,3,3);
	a[1].V = Vector<>(7,7,7);
	a[2].V = Vector<>(4,4,4);
	a[3].V = Vector<>(1,1,1);
	a[4].V = Vector<>(2,2,2);
	
	float *bb;
	
	class AAA{
		public:
		static double field(int i, A *a){
			return a[i].V.module();
		}
	};
	
	sorter.print(0, 4, a, &((*a).c));
	
	sorter.sort(0, 4, a, AAA::field);
	
	
	
	sorter.sort(0, 4, a, &((*a).d));
	
	sorter.print(0, 4, a, &((*a).d));
	
	//printf("\n");
	//sorter.print(0, 4, a, &((*a).c));
	
	//f(a);
	
	
	return 0;
}

